<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Attendance_report extends Model
{
    public $timestamps = false;
    protected $fillable = [
        'name', 'squad_id', 'attendance_cycle_id','attendance_date','crouse_time_id','classroom_id','attendance_desc'
    ];

    public function squad()
    {
        return $this->belongsTo(Squad::class); 
    }

    public function attendance_cycle()
    {
        return $this->belongsTo(Attendance_cycle::class,'attendance_cycle_id','id'); 
    }
    public function crouse_time()
    {
        return $this->belongsTo(Crouse_time::class,'crouse_time_id','id'); 
    }
    public function classroom()
    {
        return $this->belongsTo(Classroom::class,'classroom_id','id'); 
    }

    public function student_attendance_record()
    {
        return $this->hasMany(Student_attendance_record::class);
    }
}
